package com.dream.service.impl;

import com.dream.dao.UserDao;
import com.dream.domain.user.User;
import com.dream.dto.UserDTO;
import com.dream.service.UserService;

/**
 * Created by IntelliJ IDEA.
 * User: ZhongGang
 * Date: 12-12-22
 * Time: 下午3:46
 */
public class UserServiceImpl implements UserService {
    private UserDao userDao;

    @Override
    public void saveUser(UserDTO userDTO) {
        User user = userDTO.toUser();
        userDao.saveOrUpdate(user);
    }

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }
}
